package com.tequila.domain.dto;

import java.io.InputStream;

/**
 * Created by fe on 2017/9/11.
 */
public class UploadFileDto {

    private String      bucket;
    private String      category;
    private InputStream inputStream;
    private String      originalFileName;
    private String      contentType;
    private byte[]      data;

    public String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        this.bucket = bucket;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public InputStream getInputStream() {
        return inputStream;
    }

    public void setInputStream(InputStream inputStream) {
        this.inputStream = inputStream;
    }

    public String getOriginalFileName() {
        return originalFileName;
    }

    public void setOriginalFileName(String originalFileName) {
        this.originalFileName = originalFileName;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public static UploadFileDto buildUploadFileDto(String bucket, String category, InputStream inputStream, String originalFileName,
                                                   String contentType, byte[] data) {
        UploadFileDto uploadFileDto = new UploadFileDto();
        uploadFileDto.setBucket(bucket);
        uploadFileDto.setCategory(category);
        uploadFileDto.setInputStream(inputStream);
        uploadFileDto.setOriginalFileName(originalFileName);
        uploadFileDto.setContentType(contentType);
        uploadFileDto.setData(data);
        return uploadFileDto;
    }

}
